package me.zhengjie.modules.website.service;

import me.zhengjie.modules.website.domain.ArchiveInformation;
import org.springframework.data.domain.Pageable;
import me.zhengjie.modules.website.domain.PageResult;
import org.springframework.web.multipart.MultipartFile;

import java.time.LocalDateTime;
import java.util.List;

/**
 * @author system
 * @since 2024-11-05 23:38:48
 */
public interface  ArchiveInformationService {

    PageResult<ArchiveInformation> findPage(ArchiveInformation params, LocalDateTime startDate, LocalDateTime endDate, Pageable pageable);

    PageResult<ArchiveInformation> findPage(ArchiveInformation params, Pageable pageable);

    List<ArchiveInformation> findList(ArchiveInformation params);

    ArchiveInformation findById(Long id);

    ArchiveInformation insert(ArchiveInformation archiveInformation);

    ArchiveInformation update(ArchiveInformation archiveInformation);

    void delete(Long id);

    /**
     * 从 Excel 文件中导入档案信息
     *
     * @param file 上传的 Excel 文件
     * @return 导入的档案信息列表
     * @throws Exception 导入失败时抛出异常
     */
    List<ArchiveInformation> importExcel(MultipartFile file) throws Exception;
}